package com.example.project.controller;

import com.example.project.pojo.Bj;
import com.example.project.service.BjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;

@RestController
public class BjController {

    @Autowired
    BjService bjService;

    @RequestMapping("/search_bj")
    public String Bj(HttpSession session){
        List<Bj> bjLostAll = bjService.getBjAll();
        session.setAttribute("bjLostAll",bjLostAll);
        return bjLostAll.toString();
    }


}
